package com.cyrene.stock.config;

import com.cyrene.stock.properties.IdWorkerProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.cyrene.stock.util.IdWorkers;

/**
 * @Author:Shuna
 * @Date: 2025/11/07 20:33
 * @Description:
 */
@Configuration
public class IdWorkerConfiguration {
    @Bean
    public IdWorkers idWorkers(IdWorkerProperties properties) {
        return new IdWorkers(properties.getMachineId(), properties.getDataCenterId());
    }
}
